package com.qf.fmcommodity.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.fmcommodity.user.entity.UserAddr;
import com.qf.fmcommodity.user.mapper.UserAddrMapper;
import com.qf.fmcommodity.user.service.IUserAddrService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户地址  服务实现类
 * </p>
 *
 * @author 苇名一心
 * @since 2023-02-13
 */
@Service
public class UserAddrServiceImpl extends ServiceImpl<UserAddrMapper, UserAddr> implements IUserAddrService {

    @Override
    public List<UserAddr> listaddr(Integer userId) {

        List<UserAddr> userAddrs = list(new QueryWrapper<UserAddr>().eq("user_id", userId));

        return userAddrs;
    }
}
